package com.start.common.configs;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "start.security.token")
public class StartTokenConfig {
    @Schema(name = "网络请求tokenKEY")
    private String tokenKey = "Authorization" ;
    @Schema(name = "网络请求token值前缀")
    private String tokenValuePrefix = "Bearer " ;
    @Schema(name = "缓存tokenKey")
    private String redisTokenKey = "login:user:token:" ;
    @Schema(name = "缓存用户Key")
    private String redisUserInfoKey = "login:user:info" ;
    @Schema(name = "token有效时间（秒）")
    private Long tokenEffectiveTime = 72000L;
    @Schema(name = "用户有效时间（秒）")
    private Long userInfoCacheTime = 86400L;
}
